<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%--
  User: ngorosh
  Date: 18.05.11
  Time: 21:38
--%>
<html>
<head>
  <link rel="stylesheet" href="<spring:theme code='styleSheet'/>" type="text/css"/>
  <link rel="stylesheet" href="<spring:url value='/static/common-styles.css'/> " type="text/css"/>
  <title><spring:message code="notes.title"/></title>
</head>
<body>
<jsp:include page="localeChange.jsp"/>
<h2><spring:message code="notes.header"/></h2>
<table border="1">
  <tr>
    <td>&nbsp;</td>
    <td><spring:message code="note.name"/></td>
    <td><spring:message code="note.text"/></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <c:forEach items="${notes}" var="note">
    <tr>
      <td>${note.id}</td>
      <td>${note.name}</td>
      <td>${note.text}</td>
      <td><a href="<c:url value='notes/edit/${note.id}'/>"><spring:message code="edit"/></a></td>
      <td><a href="<c:url value='notes/delete/${note.id}'/>"><spring:message code="delete"/></a></td>
    </tr>
  </c:forEach>
</table>
<a href="<c:url value='notes/add'/> "><spring:message code="add"/></a>
</body>
</html>